/*
 * Copyright (C) 2018 Logos Technology Ltd.
 */

package com.logos.tool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author guoyalong
 * 线程池
 */
public class ExecutorServiceUtil {
    private static ExecutorService sExecutorService = Executors.newFixedThreadPool(8);
    private static ExecutorService sSingleThreadExecutor = Executors.newSingleThreadExecutor();

    /**
     * 获取线程池
     *
     * @return ExecutorService
     */
    public static ExecutorService getExecutorService() {
        return sExecutorService;
    }

    public static ExecutorService getSingleExecutorService() {
        return sSingleThreadExecutor;
    }
}
